-- GENERATED SPELL FOR [Azuregos] --


function spell0_6109(pUnit, Event) --@Arcane Vacuum,Self--
pUnit:FullCastSpellOnTarget(21147,pUnit)
pUnit:RegisterEvent('Sorts_6109', 600, 1)
end

function spell1_6109(pUnit, Event) --@Chill,Self--
pUnit:FullCastSpellOnTarget(21098,pUnit)
pUnit:RegisterEvent('Sorts_6109', 30324, 1)
end

function spell2_6109(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(19983,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6109', 583, 1)
end

function spell3_6109(pUnit, Event) --@Frost Breath,n/a--
pUnit:FullCastSpellOnTarget(21099,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6109', 7000, 1)
end

function spell4_6109(pUnit, Event) --@Manastorm,n/a--
pUnit:FullCastSpellOnTarget(21097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6109', 12000, 1)
end

function spell5_6109(pUnit, Event) --@Reflection,Self--
pUnit:FullCastSpellOnTarget(22067,pUnit)
pUnit:RegisterEvent('Sorts_6109', 10339, 1)
end

function Sorts_6109(pUnit, Event)
local choix_sorts_6109 = math.random(0, 5)
if choix_sorts_6109 == 0 then
pUnit:RegisterEvent('spell0_6109', 1, 1)
end
if choix_sorts_6109 == 1 then
pUnit:RegisterEvent('spell1_6109', 1, 1)
end
if choix_sorts_6109 == 2 then
pUnit:RegisterEvent('spell2_6109', 1, 1)
end
if choix_sorts_6109 == 3 then
pUnit:RegisterEvent('spell3_6109', 1, 1)
end
if choix_sorts_6109 == 4 then
pUnit:RegisterEvent('spell4_6109', 1, 1)
end
if choix_sorts_6109 == 5 then
pUnit:RegisterEvent('spell5_6109', 1, 1)
end
end

function mob6109_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6109', math.random(1500, 3000), 1)
end

function mob6109_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6109_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6109_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6109, 1, 'mob6109_Action')
RegisterUnitEvent(6109, 2, 'mob6109_Leave')
RegisterUnitEvent(6109, 3, 'mob6109_Kill')
RegisterUnitEvent(6109, 4, 'mob6109_Die')
